//
//  UIColor+Util.h
//  Peanut
//
//  Created by Jim huang on 2018/3/12.
//  Copyright © 2018年 Jim_Peanut. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIColor (Util)

//颜色创建
#undef  RGBCOLOR
#define RGBCOLOR(r,g,b) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:1]

#undef  RGBACOLOR
#define RGBACOLOR(r,g,b,a) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:a]

#undef    HEX_RGB
#define HEX_RGB(V)        [UIColor colorWithRGBHex:V]

+(UIColor *)colorWithRGBHex:(UInt32)hex;
+(UIColor *)colorWithHexString:(NSString *)stringToConvert;

//渐变色图层
+ (CAGradientLayer *)setGradualChangingColor:(UIView *)view fromColor:(UIColor *)fromColor toColor:(UIColor *)toColor;
@end
